---
layout: m1x_soap
title: Customer Redeem
---

<h3><a name="giftcard_customer.redeem-Module%3AGiftCardAPI"></a>Module: GiftCard API</h3>

<h4><a name="giftcard_customer.redeem-Resource%3Agiftcardcustomer"></a>Resource: giftcard_customer</h4>


<h5><a name="giftcard_customer.redeem-Method%3A"></a>Method:</h5>

<ul>
	<li>giftcard_customer.redeem (SOAP V1)</li>
	<li>giftcardCustomerRedeem (SOAP V2)</li>
</ul>


<p>Allows you to redeem amount from a giftcard to the customer store credit.</p>

<p><b>Arguments:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> sessionId <br class="atl-forced-newline" /> </td>
<td> Session ID </td>
</tr>
<tr>
<td> string </td>
<td> code </td>
<td> Gift card code </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> customer_id </td>
<td> Customer ID </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> store_id </td>
<td> Store view ID </td>
</tr>
</tbody></table>


<p><b>Return:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Description </th>
</tr>
<tr>
<td> boolean </td>
<td> True if the amount is redeemed </td>
</tr>
</tbody></table>


<p><b>Faults:</b></p>


<table><tbody>
<tr>
<th> Fault Code </th>
<th> Fault Message </th>
</tr>
<tr>
<td> 100 </td>
<td> Gift card does not exists. </td>
</tr>
<tr>
<td> 101 </td>
<td> Gift card is not valid. </td>
</tr>
<tr>
<td> 103 </td>
<td> Redemption functionality is disabled. </td>
</tr>
<tr>
<td> 104 </td>
<td> Unable to redeem gift card. </td>
</tr>
</tbody></table>


<h4><a name="giftcard_customer.redeem-Examples"></a>Examples</h4>

<h5><a name="giftcard_customer.redeem-RequestExampleSOAPV1"></a>Request Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy-&gt;login('apiUser', 'apiKey');

$code = "giftcardcode";
$customerId = 1;
$storeId = 1;

$giftcardInfo = $proxy-&gt;call(
    $sessionId,
    "giftcard_customer.redeem",
    array(
         $code,
         $customerId,
         $storeId
    )
);</pre>
		</div>
</div></div>

<h5><a name="giftcard_customer.redeem-RequestExampleSOAPV2"></a>Request Example SOAP V2</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy-&gt;login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary

$result = $proxy-&gt;giftcardCustomerRedeem($sessionId, 'giftcardcode', '1', '1');
var_dump($result);</pre>
		</div>
</div></div>



<h5><a name="giftcard_customer.redeem-RequestExampleSOAPV2%28WSIComplianceMode%29"></a>Request Example SOAP V2 (WS-I Compliance Mode)</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); 

$sessionId = $proxy-&gt;login((object)array('username' =&gt; 'apiUser', 'apiKey' =&gt; 'apiKey')); 
 
$result = $proxy-&gt;giftcardCustomerRedeem((object)array('sessionId' =&gt; $sessionId-&gt;result, 'code' =&gt; 'giftcardcode', 'customerId' =&gt; '1', 'storeId' =&gt; '1'));   

var_dump($result-&gt;result);</pre>
		</div>
</div></div>


